Skip to content

think: Add Computer Worker Shell workspace - #2075

Draft
aron-cf wants to merge 5 commits into
think-computer/02-computer-defaultfrom
think-computer/03-worker-shell
Draft

think: Add Computer Worker Shell workspace#2075
aron-cf wants to merge 5 commits into
think-computer/02-computer-defaultfrom
think-computer/03-worker-shell

Conversation

@aron-cf

@aron-cf aron-cf commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Think's default Computer workspace intentionally provides durable files without command execution. Applications that need shell commands require an explicit backend with a separate binding and security model.

This change adds @cloudflare/think/workspace-shell, built on Computer's WorkerShellBackend. The workspace exposes the command tool as bash rather than Computer's default exec name. Regular Think turns receive bash, and codemode receives workspace.bash() alongside the native Computer file tools. Think does not infer execution support from the workspace runtime alone.

Worker Shell runs in an isolated Dynamic Worker with outbound network access disabled by default. It operates directly on the durable Computer filesystem rather than taking and restoring the snapshots used by the legacy Bash implementation. Tool output is bounded, the tool does not expose a per-call timeout, and Worker platform execution limits still apply.

To verify the change, run pnpm exec nx run @cloudflare/think:build, pnpm run check, and pnpm --dir packages/think test. The Think test TypeScript project and the final stacked Worker tests cover direct Bash execution, durable file writes, codemode workspace.bash(), provider branding, and the absence of public ls and exec tools.

@changeset-bot

changeset-bot Bot commented Aug 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: caea3ba

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@cloudflare/think Minor
@cloudflare/agent-think Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

agents

npm i https://pkg.pr.new/agents@2075

@cloudflare/ai-chat

npm i https://pkg.pr.new/@cloudflare/ai-chat@2075

@cloudflare/codemode

npm i https://pkg.pr.new/@cloudflare/codemode@2075

create-think

npm i https://pkg.pr.new/create-think@2075

hono-agents

npm i https://pkg.pr.new/hono-agents@2075

@cloudflare/shell

npm i https://pkg.pr.new/@cloudflare/shell@2075

@cloudflare/think

npm i https://pkg.pr.new/@cloudflare/think@2075

@cloudflare/voice

npm i https://pkg.pr.new/@cloudflare/voice@2075

@cloudflare/worker-bundler

npm i https://pkg.pr.new/@cloudflare/worker-bundler@2075

commit: 4c801c6

@aron added 5 commits August 11, 2026 17:00
Expose Worker Shell as an opt-in turn-level bash tool while codemode continues to use state.* over the shared durable filesystem.
Keep createExecTool's async iterable intact while lazily creating the default workspace directory. Update direct test callers to drain the terminal snapshot.
Run Worker Shell coverage with the experimental compatibility flag required by Computer 0.2.0.
@aron-cf
aron-cf force-pushed the think-computer/03-worker-shell branch from 4c801c6 to caea3ba Compare August 11, 2026 17:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant